package com.lagou.impl;

import com.lagou.api.HelloService;

import java.util.Random;

/**
 * @Authther: mrwu
 * @date:2021/4/11-04
 * @Description:com.lagou.impl
 */
public class HelloServiceImpl implements HelloService {
    @Override
    public String hello() {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hello";
    }

    @Override
    public String call() {
        try {
            Thread.sleep(new Random(2).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        return "call";
    }

    @Override
    public String say() {
        try {
            Thread.sleep(new Random(3).nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "say";
    }
}
